<?php $sessionUser = new Zend_Session_Namespace('sessionUser'); ?>
<h2> Your Meal Plan :</h2>
Id: <?php echo $this->escape($this->userMealPlan->MealId); ?> <br>
Type: <?php echo $this->escape($this->userMealPlan->Type); ?>
<table>
    <tr>
        <th>Sunday</th>
        <th>Monday</th>
        <th>Tuesday</th>
        <th>Wednesday</th>
        <th>Thursday</th>
        <th>Friday</th>
        <th>Saturday</th>
    </tr>
        <tr>
           <td><?php echo $this->escape($this->userMealPlan->Sunday); ?></td>
           <td><?php echo $this->escape($this->userMealPlan->Monday); ?></td>
           <td><?php echo $this->escape($this->userMealPlan->Tuesday); ?></td>
           <td><?php echo $this->escape($this->userMealPlan->Wednesday); ?></td>
           <td><?php echo $this->escape($this->userMealPlan->Thursday); ?></td>
           <td><?php echo $this->escape($this->userMealPlan->Friday); ?></td>
           <td><?php echo $this->escape($this->userMealPlan->Saturday); ?></td>        
        </tr>
</table>
<h2>Other Meal Plans :</h2>
<table>
    <tr>
        <th>Id</th>
        <th>Type</th>
        <th>Sunday</th>
        <th>Monday</th>
        <th>Tuesday</th>
        <th>Wednesday</th>
        <th>Thursday</th>
        <th>Friday</th>
        <th>Saturday</th>
        <th>&nbsp;</th>
    </tr>
    <?php foreach ($this->mealPlans as $mp) : ?>
        <?php if ( $this->userMealPlan->MealId != $mp->MealId ) { ?>
        <tr>
           <td><?php echo $this->escape($mp->MealId); ?></td>
           <td><?php echo $this->escape($mp->Type); ?></td>
           <td><?php echo $this->escape($mp->Sunday); ?></td>
           <td><?php echo $this->escape($mp->Monday); ?></td>
           <td><?php echo $this->escape($mp->Tuesday); ?></td>
           <td><?php echo $this->escape($mp->Wednesday); ?></td>
           <td><?php echo $this->escape($mp->Thursday); ?></td>
           <td><?php echo $this->escape($mp->Friday); ?></td>
           <td><?php echo $this->escape($mp->Saturday); ?></td>    
           <td><a href="<?php echo $this->url(array('controller' => 'patient',
                           'action' => 'changemealplan', 'mealid' => $mp->MealId)); ?>">Take</a>
        </tr>
        <?php } ?>
    <?php endforeach; ?>
</table>

